package com.accp.vehiclecare.biz.xzhbiz;

import com.accp.vehiclecare.dao.xzhdao.BusinessTodayDao;
import com.accp.vehiclecare.vo.xzhvo.BusinessTodayVO;
import com.accp.vehiclecare.vo.xzhvo.MonthlyBusinessData;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Isolation;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

@Service("BusinessTodayBiz")
public class BusinessTodayBiz {

    @Autowired
    private BusinessTodayDao businessTodayDao;

    /**
     * 查询当天营业数据
     * @return
     */
    @Transactional(propagation = Propagation.SUPPORTS, isolation = Isolation.READ_COMMITTED, readOnly = true)
    public BusinessTodayVO queryBusinessToday(){
       return businessTodayDao.queryBusinessToday();
    }

    /**
     * 查询月度营业数据
     * @return
     */
    @Transactional(propagation = Propagation.SUPPORTS, isolation = Isolation.READ_COMMITTED, readOnly = true)
    public MonthlyBusinessData queryMonthlyOperatingData(){
        return businessTodayDao.queryMonthlyOperatingData();
    }


}
